import { createApp } from 'vue'
import Root from '@/layout/root.vue'
import index from '@/routes'
import { createPinia } from 'pinia'
import installElementPlus from '@/plugins/element'
import 'nprogress/nprogress.css'
import './assets/css/global.scss'
import './assets/css/element.scss'

const app = createApp(Root)

if (process.env.NODE_ENV === 'development') {
  require('../mock/manager')
}

app.config.warnHandler = (msg) => {
  if (msg === 'Unhandled error during execution of native event handler') {
    return
  } else if (msg.includes('Extraneous non-props attributes')) {
    return
  }
  console.warn(msg)
}
installElementPlus(app)
app.use(index).use(createPinia()).mount('#app')
